package org.spring.springboot.app.file.task;

import lombok.extern.slf4j.Slf4j;
import org.spring.springboot.app.base.RedisUtils;
import org.spring.springboot.app.file.dao.VideoDao;
import org.spring.springboot.util.ObsUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class ScheduledTask {
    @Autowired
    private VideoDao companyVideoDao;
    @Autowired
    RedisUtils redisUtils;
    @Autowired
    ObsUtils obsUtils;

    @Scheduled(cron = "5 * * * * ?")// 每5分钟
    public void CompanyVideoCroppingThreadTask(){

        log.info("cropping_jop::::::::::开始");
        new CompanyVideoCroppingThread(companyVideoDao,redisUtils,obsUtils).start();
    }


}
